package com.mcx.modules.data;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class LocalFileMgr {
    // 读取本地文件到byte数组
    public static byte[] GetBuffer(String path) {
        byte[] buffer = null;
        try {
            FileInputStream fs = new FileInputStream(path);
            buffer = new byte[fs.available()];
            fs.read(buffer, 0, buffer.length);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return buffer;
    }
}
